simple client server program in java with explanation